package com.platform.dao.mybatis.impl;

import com.platform.domain.model.GroupUserKey;
import com.platform.dao.GroupUserDao;
import com.platform.dao.mybatis.mapper.GroupUserMapper;
import com.platform.domain.model.GroupUser;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


/**
* GroupUser
*
* User: wangyang
* DateTime: 2012-10-08 16:11:49
*
*/
@Service("groupUserDao")
public class GroupUserDaoImpl implements GroupUserDao {

    @Resource
    private GroupUserMapper groupUserMapper;

    /**
    *
    * 根据主键查询GroupUser对象
    *
    * @param key
    * @return GroupUser对象
    */
    @Override
    public GroupUser selectByPrimaryKey(GroupUserKey key) throws Exception {
        return groupUserMapper.selectByPrimaryKey(key);
    }

    /**
    *
    * 根据查询条件查询符合条件的GroupUser对象
    *
    * @param groupUser
    * @return 符合条件的GroupUser对象List
    */
    @Override
    public List<GroupUser> select(GroupUser groupUser) throws Exception {
        return groupUserMapper.select(groupUser);
    }

    /**
    *
    * 根据主键删除GroupUser对象
    *
    * @param key
    * @return 影响条件数
    */
    @Override
    public int deleteByPrimaryKey(GroupUserKey key) throws Exception {
        return groupUserMapper.deleteByPrimaryKey(key);
    }

    /**
    *
    * 根据条件删除符合条件的GroupUser对象
    *
    * @param groupUser
    * @return 影响条件数
    */
    @Override
    public int delete(GroupUser groupUser) throws Exception {
        return groupUserMapper.delete(groupUser);
    }

    /**
    *
    * 插入GroupUser对象
    *
    * @param groupUser
    * @return 影响条件数
    */
    @Override
    public int insert(GroupUser groupUser) throws Exception {
        return groupUserMapper.insert(groupUser);
    }

    /**
    *
    * 更新GroupUser对象
    *
    * @param groupUser
    * @return 影响条件数
    */
    @Override
    public int update(GroupUser groupUser) throws Exception {
        return groupUserMapper.update(groupUser);
    }
}
